<html>
<!-- (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP -->
<head>
<title>Jena2 PostgreSQL HowTo</title>
<link href="../styles/doc.css" rel="stylesheet" type="text/css" />
</head>
<body>

<h1>HowTo Use PostgreSQL Database System with Jena2</h1>

<h2>What is PostgreSQL</h2>

<p><a href="http://www.postgresql.org/">PostgreSQL</a> (pronounced <i>Post-Gres-Q-L</i>.) is an enhancement of the 
POSTGRES database management system, a <small>DBMS</small> research prototype 
developed at the University of California-Berkeley in the 1990s. PostgreSQL 
is open source and supported by an active developer community.&nbsp; It runs on 
a variety of hardware and software platforms with excellent performance. See
<a href="http://www.postgresql.org">http://www.postgresql.org</a> for more 
information.</p>

<h2>Download and Installation of PostgreSQL</h2>

<p>The PostgreSQL binary distribution can be used with Jena.&nbsp; As of 
PostgreSQL version 8, there are native binaries for Linux and MS Windows. 
PostgreSQL version 7 requires <a href="http://www.cygwin.com/">Cygwin</a> to run 
on MS Windows and is more complicated to install.</p>
<p>If you prefer the source code distribution, see the instructions at
<a href="http://www.postgresql.org">http://www.postgresql.org</a> for 
downloading and building from the source.</p>

<h2>Connecting Your Jena Program to PostgreSQL</h2>

<p>Jena supports both memory models and database models. In general, a Jena program 
may use both types of models identically. However, there are some differences 
in how the models are created. </p>
<p>Persistent models are <a href="creating-db-models.html">created</a> in the 
same way for any database system: </p>
<blockquote>
  <ol>
    <li>Load the JDBC driver. This enables the Jena program to communicate with 
    the database instance.</li>
    <li>Create a database connection. This creates a Java object for a database 
    connection.</li>
    <li>Create a ModelMaker for the database</li>
    <li>Create a Model for existing or new data.</li>
  </ol>
</blockquote>

<font SIZE="2">
</font>

<h2>Notes</h2>

<p>Jena stores all models in a single database using whatever database (name) is specified on the database connection. See the <a href="index.html">Jena Database Release Notes</a> for 
details on the physical layout.</p>

</body>
</html>